import 'package:flutter/material.dart';

/// 单元格分组
class TagCellGroup extends StatelessWidget {
  final EdgeInsetsGeometry margin;
  final Color? color;
  final double borderRadius;

  final List<Widget> children;

  const TagCellGroup({
    Key? key,
    this.margin = const EdgeInsets.only(top: 10),
    this.color = Colors.white,
    required this.children,
    this.borderRadius = 0,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final colorScheme = Theme.of(context).colorScheme;
    return Container(
      margin: margin,
      decoration: BoxDecoration(
        color: color ?? colorScheme.surface,
        borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
      ),
      child: Column(
        children: children,
      ),
    );
  }
}
